home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / e_to_l / grfrm11 / show1.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-15  |  1KB  |  65 lines

  1. unit Show1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ExtCtrls, StdCtrls, Buttons, Show2, GrayForm;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     BitBtn1: TBitBtn;
  12.     BitBtn2: TBitBtn;
  13.     BitBtn3: TBitBtn;
  14.     Edit1: TEdit;
  15.     Edit2: TEdit;
  16.     Edit3: TEdit;
  17.     Edit4: TEdit;
  18.     Edit6: TEdit;
  19.     Memo1: TMemo;
  20.     Label1: TLabel;
  21.     Label2: TLabel;
  22.     Label3: TLabel;
  23.     Label4: TLabel;
  24.     Label5: TLabel;
  25.     Label6: TLabel;
  26.     Bevel1: TBevel;
  27.     procedure BitBtn1Click(Sender: TObject);
  28.     procedure BitBtn2Click(Sender: TObject);
  29.   private
  30.     { Private-Deklarationen }
  31.   public
  32.     { Public-Deklarationen }
  33.   end;
  34.  
  35. var
  36.   Form1: TForm1;
  37.  
  38. implementation
  39.  
  40. {$R *.DFM}
  41.  
  42. procedure TForm1.BitBtn1Click(Sender: TObject);
  43. begin
  44.    GrayedForm(SELF);
  45.    Form2.ShowModal;
  46.    UnGrayedForm(SELF);    { don't forget !!! }
  47. end;
  48.  
  49. procedure TForm1.BitBtn2Click(Sender: TObject);
  50. var i : integer;
  51. begin
  52.    Form2.Show;             { first this ! }
  53.    GrayedForm(SELF);    { now this ! }
  54.    for i := 1 to 1000 do
  55.       begin
  56.          { do something }
  57.          Form2.Label1.caption := inttostr(i);
  58.          Form2.Label1.Update;
  59.       end;
  60.    Form2.Hide;
  61.    UnGrayedForm(SELF);    { don't forget !!! }
  62. end;
  63.  
  64. end.
  65.